#include <iostream>
#include <string>
#include <cstring>

class AbstractDrink
{
public:
    //1、烧开水
    virtual void Boil() = 0;
    //2、放入原料
    virtual void Pour() = 0;
    //3、搅拌
    virtual void Stir() = 0;

    void MakeDrink()
    {
        Boil();
        Pour();
        Stir();
        std::cout<<"做出了一杯"<<name<<std::endl;
    }
// private:
    std::string name;
};

class Coffee:public AbstractDrink
{
public:
    Coffee()
    {
        name = "咖啡";
    }
    void Boil()
    {
        std::cout<<"烧矿泉水"<<std::endl;
    }
    void Pour()
    {
        std::cout<<"倒入咖啡"<<std::endl;
    }
    void Stir()
    {
        std::cout<<"用勺子搅拌"<<std::endl;
    }
};

class MilkTea:public AbstractDrink
{
public:
    MilkTea()
    {
        name = "奶茶";
    }
    void Boil()
    {
        std::cout<<"热牛奶"<<std::endl;
    }
    void Pour()
    {
        std::cout<<"倒入奶茶粉"<<std::endl;
    }
    void Stir()
    {
        std::cout<<"用吸管搅拌"<<std::endl;
    }
};

int main()
{
    AbstractDrink *d = new MilkTea;
    d->MakeDrink();
    return 0;
}